package ;
import bee2d.display.Animation;
import bee2d.spritesheet.importers.AnimoImporter;
import bee2d.spritesheet.Spritesheet;

/**
 * ...
 * @author wangjian QQ:421924396
 */

class Fish extends Animation 
{
	public static var fishSpriteSheet:Spritesheet;
	public static function initFishAssets():Void {
		fishSpriteSheet = AnimoImporter.parse(ApplicationMain.getAsset ("assets/fish.xml"), "assets");
	}
	var vscale:Int = 1;
	public function new() 
	{
		super(fishSpriteSheet);
		onUpdate = onFrame;
	}
	public function onFrame():Void {
		x += 5;
		if (x > 800) x = 0;
		//rotation += Math.random()*10;
		//var scale = scaleX + 0.1*vscale;
		//if (scale > 2 ) {
			//vscale = -1;
			//scale = 2;
		//}else if(scale < 1) {
			//vscale = 1;
			//scale = 1;
		//}
		//scaleX = scale;
		//scaleY = scale;
	}
}